package day2.zuoye;

import java.util.Scanner;

public class Test04 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个五位的数");
        int ge, shi,bai,qan,wan,he;
        int a=input.nextInt();
        ge=a%10;
        shi=(a/10)%10;
        bai=(a/100)%10;
        qan=(a/1000)%10;
        wan=a/10000;
        he=ge+shi+bai+qan+wan;
        System.out.println(a+"的各个位置上的和为"+he);
    }
}
